<?php
$path = $_SERVER['DOCUMENT_ROOT'];
require_once "$path/public/Products.php";
include "$path/view/head.php";
$product = new Products();
//$news->init();
$product->loadById($_GET["detail_id"]);
$type = !empty($_GET["type"]) ? "type=" . $_GET["type"] : "";
$pid = !empty($_GET["pid"]) ? "pid=" . $_GET["pid"] : "";
$id = !empty($_GET["id"]) ? "id=" . $_GET["id"] : "";
include "$path/view/banner.php";
include "$path/view/left.php"; ?>
<div class="product_details">
    <h5 class="ns_ds_title"><?php echo $product->productDatas["productName"] ?></h5>
    <div class="tc" style=""> 发布日期：<?php echo $product->productDatas["createdDate"] ?>
        来源: 未知 阅读量（<span name="clickTimes"><?php echo $product->productDatas["clickTimes"] ?></span>）
    </div>
    <div class="data_content">
        <div class="product_text"><?php echo $product->productDatas["productDesc"] ?></div>
        <?php
        if (!empty($product->pictures)) {
            foreach ($product->pictures as $picture) {
                ?>
                <img src="/<?php echo $basepath . "/" . $picture["downloadUrl"] ?>"
                     title="<?php echo $picture["remark"] ?>"/>
                <div class="product_text"><?php echo $picture["remark"] ?></div>
            <?php }
        } ?>
    </div>

</div>
<div class="mainFoot"><a
            href="http://v.t.sina.com.cn/share/share.php?title=<?php echo $product->productDatas["productName"] ?>">
        <div class="child">
            <div class="childIcon"><img src="/<?php echo $basepath ?>/assert/images/weibo.png"/></div>
            <div class="childInfo">
                <p> 分享到 </p>
                <p> 新浪微博 </p>
            </div>
        </div>
    </a>
    <div class="child">
        <div class="bdsharebuttonbox bdshare-button-style0-32" data-bd-bind="1450354301884"><a href="#"
                                                                                               class="bds_more"
                                                                                               data-cmd="more"></a><a
                    href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
        <script>
            window._bd_share_config = {
                "common": {
                    "bdSnsKey": {},
                    "bdText": "",
                    "bdMini": "2",
                    "bdMiniList": false,
                    "bdPic": "",
                    "bdStyle": "0",
                    "bdSize": "32"
                }, "share": {}
            };
            with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
        </script>
        <div class="childIcon"><img src="/<?php echo $basepath ?>/assert/images/wechat.png"/></div>
        <div class="childInfo">
            <p> 分享到 </p>
            <p> 朋友圈 </p>
        </div>
    </div>
    <a onClick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;">
        <div class="child">
            <div class="childIcon"><img src="/<?php echo $basepath ?>/assert/images/qqzone.png"/></div>
            <div class="childInfo">
                <p> 分享到 </p>
                <p> QQ空间 </p>
            </div>
        </div>
    </a></div>

</div>
</div>
</div>
<?php include "$path/view/recommend.php"; ?>
<?php /*if ($cms->is_html) { */?>
    <script type="text/javascript" src="/<?php echo $basepath ?>/assert/js/click_record.js"></script>
    <script type="text/javascript">
        $(function () {
            let id =<?php echo $_GET["detail_id"]?>;
            clickRecord.productRecord(id,function (data) {
                $("span[name='clickTimes']").html(data);
            })
            //页面点击次数记录
            clickRecord.productClick(id);
        });
    </script>
<?php /*} */?>
<?php
include "$path/view/footer.php"; ?>
